<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象</title>
</head>
<body>
<h1 style="color:#0ff">对象</h1>
<script type="text/javascript">
    //数组 一组有序的数据
    var arr=['zhangsan','30'];
    console.log(arr[0]);
    console.log(arr[1]);
    var obj={"name":"weisang","age":"28"};
    var obj2={"name":"kali","age":"20"};
    console.log(obj.name);
    console.log(obj.age);
    console.log(obj2.age);
    console.log(obj2.name);
    var obj3={
        "age":20,
        "name":"weisang",
        "say":function(m) {
            console.log("hello" + m);
        }
    };
    // say 对应一个函数，所以通常把say叫做是对象的方法
    obj3.say(100);
    console.log(obj3['age']);
    delete obj3.age;
    console.log(obj3['age']);
</script>
</body>
</html>